package homework.day319.demo1;

public class SmallDog extends Dog {
    private int age;

    public void sleep(int time){
        System.out.println("刚刚睡了"+time+"分钟");
    }

    public SmallDog() {
    }

    public SmallDog(String name, String colour, int age) {
        super(name, colour);
        this.age = age;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    @Override
    public String toString() {
        return "我的名字叫"+super.getName()+"，颜色是"+super.getColour()+",今年"+age+"岁";
    }
}
